package com.usian.admin.fegin;

import com.usian.model.article.ApArticle;
import com.usian.model.article.ApArticleConfig;
import com.usian.model.article.ApArticleContent;
import com.usian.model.article.ApAuthor;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient("leadnews-article")
public interface ArticleFeign {

    @PostMapping("/article_config/save")
    ResponseResult saveArticleConfig(ApArticleConfig apArticleConfig);

    @GetMapping("/article-au/findByName/{name}")
    ApAuthor findByName(@PathVariable("name") String name);

    @PostMapping("/article/save")
    ApArticle saveArticle(ApArticle apArticle);

    @PostMapping("/article_content/save")
    ResponseResult saveArticleContent(ApArticleContent apArticleContent);

}
